<?php

/**
 * PermisosForm class.
 * PermisosForm is the data structure for keeping
 * permisos permiten asignar un conjunto de roles y un perfil al usuario.
 */
class PermisosForm extends CFormModel
{
	public $perfil;
	public $roles;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			// el perfil es obligatorio
			array('perfil', 'required'),
			// los roles son opcionales
			array('roles', 'safe'),
				// email has to be a valid email address
		);
	}

	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'perfil'=>'Perfil en el sistema',
			'roles'=>'Roles de la empresa',
		);
	}
}